<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="http://www.cnboy.top/Forfun/Bootstrap/css/bootstrap.min.css">
    <script src="http://www.cnboy.top/Forfun/Bootstrap/js/jquery.min.js"></script>
    <script src="http://www.cnboy.top/Forfun/Bootstrap/js/popper.min.js"></script>
    <script src="http://www.cnboy.top/Forfun/Bootstrap/js/bootstrap.min.js"></script>
    <title>Blog首页</title>
</head>
<body>
<div class="jumbotron text-center" style="margin-bottom:0">
    <h1>Blog首页</h1>
</div>

<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
    <a class="navbar-brand" href="index.php">首页</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
        <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="collapsibleNavbar">
        <ul class="navbar-nav">
            <li class="nav-item">
                <a class="nav-link" href="#">链接</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">链接</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">链接</a>
            </li>
        </ul>
    </div>
</nav>

<div class="container" style="margin-top:30px">
    <div class="row">
        <div class="col-sm-4">
            <h2>栏目</h2>
            <ul>
                <?php foreach($cats as $c) {?>
                <li><a href="index.php?cat_id=<?php echo $c['cat_id']; ?>"><?php echo $c['cat_name']; ?></a> </li>
                <?php } ?>
            </ul>
            <h3>一些链接</h3>
            <p>说明文本</p>
            <ul class="nav nav-pills flex-column">
                <li class="nav-item">
                    <a class="nav-link active" href="#">激活状态</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">链接</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="#">链接</a>
                </li>
                <li class="nav-item">
                    <a class="nav-link disabled" href="#">禁用</a>
                </li>
            </ul>
            <hr class="d-sm-none">
        </div>
        <div class="col-sm-8">
            <?php foreach($arts as $a) { ?>
            <article>
                <h3>文章：<a href="art.php?art_id=<?php echo $a['art_id'];?>"><?php echo $a['title']; ?></a></h3>
                <div class="entry_header">
                    <time><?php echo date('Y/m/d',$a['pubtime']) ;?></time>
                    by
                    <a href="#"><?php echo $a['author'];?></a>
                    <a class="catlink"><?php echo $a['cat_name']; ?></a>
                    <a class="comment"><span class="badge badge-info">!</span><?php echo $a['comm']; ?>条评论</a>
                </div>
                <div class="row">
                <?php  if ($a['thumb']) { ?>
                <img  class="col-sm-4" src="./<?php echo $a['thumb']; ?>" alt="">
                <?php  } ?>
                <div class="col-sm-6 card">

                    <p style="font-size:20px;"><?php echo $a['content']; ?></p>
                </div>
                </div>
            </article>
            <?php } ?>
            <div class="container text-center">
            <div class="btn-group btn-group-lg">
                <?php foreach($page as $k=>$v){ ?>
                <a class="btn btn-info" href="index.php?<?php echo $v;?>"><?php echo $k;?></a>
                <?php } ?>
            </div>
            </div>
        </div>
    </div>
</div>

<div class="jumbotron text-center" style="margin-bottom:0">
    <p>底部内容</p>
</div>
</body>
</html>